Shopglut\enhancements\ProductBadges\BadgeDataManage D

Total Complexity 361
Dependencies 1
Dependents 4
Total lines 1,839
Lines of code 1,261
Logical lines of code 862
Comment lines 265
Methods 47
Properties 1

Methods 47

Method Rating Maintainability Complexity Lines of code
build_badge_css()
D
31 44 84
build_preview_styles_from_form()
D
34 37 73
get_simple_badge_text()
C
36 26 68
shopglut_render_badge_preview()
C
37 25 71
get_nested_value()
B
44 22 46
should_display_badge_by_conditions()
A
47 15 34
save_productbadge_data()
A
43 11 45
build_badge_positioning_css()
A
29 1 194
product_meets_minimum_discount()
A
50 12 26
get_active_badges_for_product_by_display_area()
A
46 11 38
add_badge_positioning_script()
A
43 5 106
build_badge_preview_styles()
A
54 9 19
check_sale_conditions()
A
54 8 22
product_has_percentage_discount()
S
58 8 15
product_has_fixed_discount()
S
58 8 15
product_is_new()
S
50 7 29
reset_productbadge_settings()
S
50 7 27
render_badge()
S
54 7 23
check_featured_conditions()
S
55 7 20
check_out_of_stock_conditions()
S
55 7 20
check_backorder_conditions()
S
55 7 20
check_price_range_conditions()
S
56 7 19
generate_badge_css()
S
51 6 26
display_badges_on_product_image()
S
51 6 26
should_display_badge_for_product()
S
58 6 16
check_custom_date_conditions()
S
61 5 12
product_has_low_stock()
S
61 5 12
display_badges_before_title()
S
58 4 16
sanitize_badge_settings()
S
59 4 15
check_product_type_conditions()
S
60 4 14
check_user_role_conditions()
S
61 3 12
product_is_featured()
S
68 3 7
product_is_out_of_stock()
S
68 3 7
render_single_badge()
S
58 2 14
get_instance()
S
71 2 6
add_badge_custom_css()
S
71 2 6
product_is_featured_in_categories()
S
66 2 8
check_category_conditions()
S
66 2 8
check_tag_conditions()
S
66 2 8
get_direct_badge_value()
S
70 2 6
__construct()
S
68 1 7
register_badge_display_hooks()
S
69 1 6
get_active_badges_for_product()
S
79 1 3
check_new_conditions()
S
79 1 3
product_is_featured_in_price_range()
S
82 1 3
check_low_stock_conditions()
S
79 1 3
product_is_on_sale()
S
78 1 3